﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ResourceList.aspx.cs" Inherits="sysadmin_CourseManager_ResourceList" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//Dtd XHTML 1.0 transitional//EN" "http://www.w3.org/tr/xhtml1/Dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>资源列表</title>
    <link href="../../css/1/css/css.css" type="text/css" rel="stylesheet" />

    <script type="text/javascript" language="javascript">
        function ShowNo()                        //隐藏两个层
        {
            document.getElementById("doing").style.display="none";
            document.getElementById("divLogin").style.display="none";
        }
        function $(id)         
        {
            return (document.getElementById) ? document.getElementById(id) : document.all[id] ;
        }
        function showFloat()                    //根据屏幕的大小显示两个层
        {
            var range = getRange();
            $('doing').style.width = range.width + "px";
            $('doing').style.height = range.height + "px";
            $('doing').style.display = "block";
            document.getElementById("divLogin").style.display="";
        }
        function getRange()                      //得到屏幕的大小
        {
              var top     = document.body.scrollTop;
              var left    = document.body.scrollLeft;
              var height  = document.body.clientHeight;
              var width   = document.body.clientWidth;

              if (top==0 && left==0 && height==0 && width==0) 
              {
                top     = document.documentElement.scrollTop;
                left    = document.documentElement.scrollLeft;
                height  = document.documentElement.clientHeight;
                width   = document.documentElement.clientWidth;
              }
              return  {top:top  ,left:left ,height:height ,width:width } ;
        } 

    </script>

</head>
<body class="bodymain">
    <form id="form1" runat="server">
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tree-titbg_right">
            <tr>
                <td class="tree-titbg_left">
                    <asp:Label ID="lbl_InfoTitle" runat="server" Text=""></asp:Label>
                    <asp:LinkButton ID="lnkbtn_CourseName" runat="server" ForeColor="Red"></asp:LinkButton>
                    <asp:Label ID="lbl_CourseName" runat="server" Text="" ForeColor="AppWorkspace"></asp:Label></td>
            </tr>
        </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="btnbg">
            <tr>
                <td>
                    <asp:CheckBox ID="chkAll" runat="server" Text="全选/取消" OnCheckedChanged="chkAll_CheckedChanged"
                        AutoPostBack="True" ValidationGroup="gs" />
                    <asp:CheckBox ID="chkCancel" runat="server" Text="反选" OnCheckedChanged="chkCancel_CheckedChanged"
                        AutoPostBack="True" ValidationGroup="gs" />
                    <asp:Button ID="btn_AuditingStateYes" runat="server" Text="审核" CssClass="inputBotton2"
                        OnClick="btn_AuditingStateYes_Click" />
                    <asp:Button ID="btn_AuditingStateNo" runat="server" Text="冻结" CssClass="inputBotton2"
                        OnClick="btn_AuditingStateNo_Click" />
                    <asp:Button ID="btn_del" runat="server" Text="删除" CssClass="inputBotton2" OnClick="btn_del_Click" />
                    <input type="button" name="btn_Upload" value="上传资源" class="inputBotton2" id="btn_Upload"
                        runat="server" onserverclick="btn_Upload_ServerClick" />
                    <input type="button" name="btn_AddNew" value="添加新资源记录" class="inputBotton2" id="btn_AddNew"
                        runat="server" onserverclick="btn_AddNew_ServerClick" />
                    <input type="button" name="btn_AddCourseResource" id="btn_AddCourseResource" value="引用现有资源"
                        class="inputBotton2" runat="server" onserverclick="btn_AddCourseResource_ServerClick" />
                    <input type="button" name="btn_AddPaper" id="btn_AddPaper" value="引用试卷" class="inputBotton2"
                        runat="server" onserverclick="btn_AddPaper_ServerClick" />
                    <asp:Button ID="btn_Back" runat="server" Text="" CssClass="inputBotton2" OnClick="btn_Back_Click" />
                </td>
                <td>
                    <asp:TextBox ID="txt_SearchKey" runat="server"></asp:TextBox>
                    <asp:Button ID="btn_SortSearch" runat="server" Text="搜索" CssClass="inputBotton2"
                        OnClick="btn_SortSearch_Click" />&nbsp; <!--<a href="javascript:void(0)" onclick="showFloat()">
                            <%=GetLanageValueByKey("btn_LevelSearch", PowerCreator.LMS.Language.LanagetItemType.Page)%>-->
                            <!--高级搜索-->
                       <!-- </a>-->&nbsp;
                </td>
            </tr>
        </table>
        <asp:Repeater ID="rptResource" runat="server" OnItemCommand="rptResource_ItemCommand" OnItemDataBound="rpt_ItemDataBound">
            <HeaderTemplate>
                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="mainList">
                    <tr>
                        <th>
                            &nbsp;</th>
                        <th>
                            <%=GetLanageValueByKey("lbl_ResourceList_ResourceName", PowerCreator.LMS.Language.LanagetItemType.Page)%>
                            <!--资源名称-->
                        </th>
                        <th>
                            <%=GetLanageValueByKey("ResourceSelect_gv_c1", PowerCreator.LMS.Language.LanagetItemType.Page)%>
                            <!--资源状态-->
                        </th>
                        <th>
                            <%=GetLanageValueByKey("ResourceList_gv_c1", PowerCreator.LMS.Language.LanagetItemType.Page)%>
                            <!--资源文件类别-->
                        </th>
                        <th>
                            <%=GetLanageValueByKey("ResourceSelect_lbl_l2", PowerCreator.LMS.Language.LanagetItemType.Page)%>
                            <!--资源分类-->
                        </th>
                        <th>
                            <%=GetLanageValueByKey("ManagerRole_gv_c4", PowerCreator.LMS.Language.LanagetItemType.Page)%>
                            <!-- 操作-->
                        </th>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td>
                        <asp:CheckBox ID="chkSelect" runat="server" />
                        <asp:Label ID="lblid" runat="server" Text='<%#Eval("CourseresID")%>' Visible="False"></asp:Label>
                        <asp:Label ID="lbl_resourcetype" runat="server" Text='<%#Eval("CoursersClassID")%>'
                            Visible="False"></asp:Label>
                        <asp:Label ID="lbl_resourceid" runat="server" Text='<%#Eval("CoursersResourceID")%>'
                            Visible="False"></asp:Label>
                    </td>
                    <td>
                        <%#Eval("ResourceName")%>
                        &nbsp;
                    </td>
                    <td>
                        <%# opCourse.GetCourseStateByData(int.Parse(Eval("VOTresourceState").ToString()), GetLanageValueByKey("State_Msg2", PowerCreator.LMS.Language.LanagetItemType.Page), GetLanageValueByKey("AddCourseInfo_db_d2", PowerCreator.LMS.Language.LanagetItemType.Page))%>
                        &nbsp;
                    </td>
                    <td>
                        <%#Eval("CoursersClassName")%>
                        &nbsp;
                    </td>
                    <td>
                        <%#Eval("CoursersRestpName")%>
                        &nbsp;
                    </td>
                    <td>
                        <asp:LinkButton ID="lnkbtn_state" runat="server" CommandName="lstate" CommandArgument='<%#Eval("CourseresID")%>'>
                        <%=GetLanageValueByKey("TeacherManager_gv_c1", PowerCreator.LMS.Language.LanagetItemType.Page)%>
                        <!--审核--></asp:LinkButton>
                        |
                        <asp:LinkButton ID="lnkbtn_edit" runat="server" CommandName="ledit" CommandArgument='<%#Eval("CourseresID")%>'>
                        <%=GetLanageValueByKey("ManagerRole_gv_lnk_o1", PowerCreator.LMS.Language.LanagetItemType.Page)%>
                        <!--编辑--></asp:LinkButton>
                        |
                        <asp:LinkButton ID="lnkbtn_del" runat="server" CommandName="ldel" CommandArgument='<%#Eval("CourseresID")%>' >
                            <%=GetLanageValueByKey("ManagerRole_gv_lnk_o2", PowerCreator.LMS.Language.LanagetItemType.Page)%>
                            <!--删除--></asp:LinkButton>
                        |
                        <asp:LinkButton ID="lnkbtn_show" runat="server" CommandName="lshow" CommandArgument='<%#Eval("CourseresID")%>'>
                        <%=GetLanageValueByKey("ResourceList_gv_c2", PowerCreator.LMS.Language.LanagetItemType.Page)%>
                        <!--打开看看--></asp:LinkButton>
                        |
                        <asp:LinkButton ID="lnkbtn_pl" runat="server" CommandName="lpl" CommandArgument='<%#Eval("CourseresID")%>'
                            Visible="True">
                            <%=GetLanageValueByKey("ResourceList_gv_c3", PowerCreator.LMS.Language.LanagetItemType.Page)%>
                            <!--管理点评--></asp:LinkButton>
                        
                        <asp:LinkButton ID="lnkbtn_add" runat="server" CommandName="add" CommandArgument='<%#Eval("CoursersResourceID")%>'
                            Visible="False">
                            |<%=GetLanageValueByKey("ResourceList_gv_c4", PowerCreator.LMS.Language.LanagetItemType.Page)%>
                            <!--添加下载--></asp:LinkButton>
                        <asp:Label ID="lbl_resourcetype_paper" runat="server" Text="" ForeColor="red"></asp:Label>
                    </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                </table>
            </FooterTemplate>
        </asp:Repeater>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td align="center">
                    <webdiyer:AspNetPager ID="AspNetPager1" runat="server" HorizontalAlign="Center" OnPageChanged="AspNetPager1_PageChanged"
                        ShowCustomInfoSection="Left" Width="100%" meta:resourcekey="AspNetPager1" Style="font-size: 14px"
                        InputBoxStyle="width:19px" CustomInfoHTML="当前页  <font color='red'><b>%CurrentPageIndex%</b></font> 总页数  %PageCount%  当前条数 %StartRecordIndex%-%EndRecordIndex%"
                        FirstPageText="首页" LastPageText="末页" NextPageText="下一页" PrevPageText="上一页">
                    </webdiyer:AspNetPager>
                </td>
            </tr>
        </table>
        <div id="doing" style="filter: alpha(opacity=30); -moz-opacity: 0.3; opacity: 0.3;
            background-color: #000; width: 100%; height: 100%; z-index: 1000; position: absolute;
            left: 0; top: 0; display: none; overflow: hidden;">
        </div>
        <div id="divLogin" style="border: solid 10px #898989; background: #fff; padding: 10px;
            width: 780px; z-index: 1001; position: absolute; display: none; top: 50%; left: 50%;
            margin: -200px 0 0 -400px;">
            <div style="padding: 3px 15px 3px 15px; text-align: left; vertical-align: middle;">
                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableList2">
                    <tr>
                        <th>
                            <asp:Label ID="lbl_ResourceName" runat="server" Text=""></asp:Label></th>
                        <td>
                            <input type="text" id="txt_ResourceName" name="txt_ResourceName" runat="server" /></td>
                        <th>
                            <asp:Label ID="lbl_CoursersClass" runat="server" Text=""></asp:Label></th>
                        <td>
                            <asp:DropDownList ID="ddl_CoursersClass" runat="server">
                            </asp:DropDownList></td>
                    </tr>
                    <tr>
                        <th>
                            <asp:Label ID="lbl_CoursersRestp" runat="server" Text=""></asp:Label></th>
                        <td>
                            <asp:DropDownList ID="ddl_CoursersRestp" runat="Server">
                            </asp:DropDownList></td>
                    </tr>
                    <tr>
                        <td colspan="4" class="tree-bottom-bg">
                            <input type="button" value="查询" id="btn_Search" name="btn_Search" class="inputBotton2"
                                runat="server" onserverclick="btn_Search_ServerClick" />
                            <input id="Button2" type="button" value="<%=GetLanageValueByKey("btn_Colse", PowerCreator.LMS.Language.LanagetItemType.Page)%>" class="inputBotton2" onclick="ShowNo();" />
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </form>
</body>
</html>
